﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

using SharePointOnlineServices;

namespace AzureSharePointWcf
{
    public class SharePointDocumentSet : ISharePointDocumentSet
    {
        public void SaveDocumentSet(DocumentSetSaveProperties saveProperties)
        {
            var contextProvider = new SharePointContextProvider();

            using (var context = contextProvider.CreateSharePointContext(saveProperties.SitePath))
            {
                var documentSetUtility = new DocumentSetUtility(context);
                documentSetUtility.SaveDocumentSet(saveProperties);
            }
        }
    }
}
